﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SQLIOSimParser
{

    public partial class ResultsPane : Form
    {

        DataSet dsResults;

        public ResultsPane(DataSet dsResults)
        {
            InitializeComponent();
            this.dsResults = dsResults;
            dataGridView1.DataSource = dsResults.Tables[0];
            dataGridView2.DataSource = dsResults.Tables[1];
        }

        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if(e.RowIndex != -1)
                dsResults.Tables[1].DefaultView.RowFilter = "TestID = " + dataGridView1.Rows[e.RowIndex].Cells["TestId"].Value;
        }
    }
}
